package uscdb.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import uscdb.dao.UserDaoI;
import uscdb.model.Tuser;

@Repository
public class UserDaoImpl extends BaseDaoImpl<Tuser> implements UserDaoI {

	@Override
	public Tuser getBySid(String sid) {
		String hql = "from Tuser t where t.sid = :sid";
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("sid", sid);
		Tuser tuser = get(hql, params);
		if (tuser != null) {
			return tuser;
		}
		return null;
	}
}
